package com.gxa.mapper.zijinmapper;

import com.gxa.pojo.*;
import org.apache.ibatis.annotations.Param;

import java.math.BigDecimal;
import java.util.Date;
import java.util.List;

/**
 * @author zhaohaoc
 * @version 1.0
 * @date 2022/4/2 11:26
 */
public interface ShouKuanMapper {

    List<KeHu> selectAllKeHu();

    List<ZhangHu> selectAllZhangHu();

    List<JieSuanWay> selectJieSuanWay();

    List<ShouKuanDan> selectShouKuanDan(@Param("startTime") String startTime,
                                        @Param("endTime") String endTime,
                                        @Param("shouKuanDanBianHao") String shouKuanDanBianHao,
                                        @Param("keHuMingCheng") String keHuMingCheng,
                                        @Param("shouKuanDanBeiZhu") String shouKuanDanBeiZhu);

    List<XiaoHuoDan> selectXiaoHuoDan(@Param("startTime") String startTime,
                                      @Param("endTime") String endTime,
                                      @Param("keHuId")  String keHuId,
                                      @Param("xiaoHuoDanBianHao") String xiaoHuoDanBianHao);

    KeHu selectKeHuIdByKeHuMingCheng(@Param("keHuMingCheng") String keHuMingCheng);

    int delShouKuanDanByBianHao(@Param("shouKuanDanBianHao") String shouKuanDanBianHao);

    int delShouKuanDanInFo(@Param("shouKuanDanId") long shouKuanDanId);

    int addShouKuanDan(@Param("shouKuanDanRiQi") String shouKuanDanRiQi,
                       @Param("shouKuanDanBianHao") String shouKuanDanBianHao,
                       @Param("keHuId") long keHuId,
                       @Param("shouKuanDanBeiZhu") String shouKuanDanBeiZhu,
                       @Param("shouKuanDanZongJinE") String shouKuanDanZongJinE);

    long  selectShouKuanDanByShouKuanBianHao(@Param("shouKuanDanBianHao") String shouKuanDanBianHao);


    int addShouKuanDanInFo(@Param("zhangHuId") long zhangHuId,
                           @Param("shouKuanJinE") BigDecimal shouKuanJinE,
                           @Param("shouKuanDanId") long shouKuanDanId,
                           @Param("jieSuanWayId") long jieSuanWayId);

    int addShouKuanXiaoHuoInFo(@Param("shouKuanDanId") long shouKuanDanId,
                               @Param("xiaoHuoDanId") long xiaoHuoDanId);

    int updateShouKuanDan(@Param("shouKuanDanId") long shouKuanDanId,
                          @Param("shouKuanDanBeiZhu") String shouKuanDanBeiZhu,
                          @Param("shouKuanDanZongJinE") String shouKuanDanZongJinE);

    int updateShouKuanDanInFo(@Param("zhangHuId") long zhangHuId,
                              @Param("shouKuanJinE") BigDecimal shouKuanJinE,
                              @Param("shouKuanDanId") long shouKuanDanId,
                              @Param("jieSuanWayId") long jieSuanWayId);

    int delShouKuanXiaoHuo(@Param("shouKuanDanId") long shouKuanDanId);

    int updateShouKuanXiaoHuoInFo(@Param("shouKuanDanId") long shouKuanDanId,
                                  @Param("xiaoHuoDanId") long xiaoHuoDanId);
}
